<template>
  <div class="component">
    <div @click="click" class="image">
      <svg
        data-name="Layer 1"
        xmlns="http://www.w3.org/2000/svg"
        viewBox="0 0 609 458.58997"
        xmlns:xlink="http://www.w3.org/1999/xlink"
      >
        <path
          d="M818.745,561.355v53.6H381.255V285.045h437.49v276.31Z"
          transform="translate(-295.5 -220.70502)"
          fill="#fff"
        />
        <path
          d="M381.255,614.455v1h437.49v-1Zm0-329.91v1h437.49v-1Z"
          transform="translate(-295.5 -220.70502)"
          fill="#f2f2f2"
        />
        <path
          d="M762.08123,578.985c.12524-.04.23662-.09.36194-.13.50112-.18,1.03009-.34,1.57292-.48H764.03a.54829.54829,0,0,1,.01393-.15C763.38975,578.475,762.73545,578.735,762.08123,578.985Zm-6.33372,4.56c.02778-.03.04171-.06.06958-.09.13917-.19.30621-.39.47324-.58a13.823,13.823,0,0,1,4.77466-3.45,3.56322,3.56322,0,0,1,.40375-.18,5.34752,5.34752,0,0,1,.50111-.21c.0418-.02.06958-.03.11138-.05-4.07864,1.57-8.19908,3.1-12.37518,4.56ZM295.5,284.045l3.105,51.66L904.5,286.045v-2Zm609,277.31v54.6h-609v-2l36.105-53.25,235.55,53.25a559.39576,559.39576,0,0,0,144.57642-18.65c.94658-.24,1.87924-.5,2.8119-.76,4.09258-1.12,8.11555-2.28,12.13852-3.5h.04176q11.69307-3.495,22.98245-7.5,6.2015-2.175,12.2638-4.51a.54584.54584,0,0,1,.11136-.05c.65425-.25,1.30851-.51,1.96276-.76l2.4639-.96h.04176c8.79764-3.48,17.34472-7.18,25.72475-11.09.61249-.28,1.21107-.56,1.80964-.85q7.28729-3.435,14.35185-7.09,8.85331-4.56,17.33079-9.44,17.37257-9.99,33.14428-21.26a361.30106,361.30106,0,0,0,31.12583-24.84q6.01358-5.37,11.67915-10.95c.93266-.92,1.86532-1.84,2.78406-2.77v72.38Z"
          transform="translate(-295.5 -220.70502)"
          fill="#f2f2f2"
        />
        <path
          d="M465.845,557.985h-84.59v4.57h84.59a2.285,2.285,0,0,0,0-4.57Z"
          transform="translate(-295.5 -220.70502)"
          fill="#f2f2f2"
        />
        <path
          d="M465.845,541.985h-84.59v4.57h84.59a2.285,2.285,0,0,0,0-4.57Z"
          transform="translate(-295.5 -220.70502)"
          fill="#f2f2f2"
        />
        <path
          d="M466.525,526.085a2.38614,2.38614,0,0,0-.32995-.07,1.98256,1.98256,0,0,0-.35-.03h-84.59v4.57h84.59a2.30792,2.30792,0,0,0,1.47-.54,2.28909,2.28909,0,0,0-.79-3.93Z"
          transform="translate(-295.5 -220.70502)"
          fill="#f2f2f2"
        />
        <path
          d="M496.765,519.855l-7.45-33.06-2.43-10.77a3.43529,3.43529,0,0,0-4.11005-2.59l-3.67.83-29.43,6.64a3.42783,3.42783,0,0,0-2.59,4.1c-1.58,14.71,1.54,28.28,8.31,40.98.5.95,1.03,1.9,1.58,2.85a3.39073,3.39073,0,0,0,.97,1.72,3.44192,3.44192,0,0,0,3.12994.87l3.86005-.87,2.38-.54,26.86-6.06A3.42988,3.42988,0,0,0,496.765,519.855Z"
          transform="translate(-295.5 -220.70502)"
          fill="#e6e6e6"
        />
        <path
          d="M493.685,518.015l-7.1-31.45-1.7-7.55a3.21488,3.21488,0,0,0-3.84-2.43l-2.26.51-26.19,5.91a3.21489,3.21489,0,0,0-2.43,3.84c.23,11.45,1.43,21.84,6.36,28.18a14.31914,14.31914,0,0,0,9.82,10.53c.06.02.11.04.17.06.04.01.09.03.13.04a14.21363,14.21363,0,0,0,6.99.18l17.62-3.98A3.21487,3.21487,0,0,0,493.685,518.015Z"
          transform="translate(-295.5 -220.70502)"
          fill="#fff"
        />
        <path
          d="M467.59252,493.49148a4.09886,4.09886,0,0,1,4.79639-1.04586,4.21,4.21,0,0,1,2.14657,4.57693c-.31194,2.063-1.38955,3.9411-1.48742,6.05338a5.20218,5.20218,0,0,0,2.24153,4.78615c1.17464.71366,2.38368-1.053,1.2034-1.77011-1.94218-1.18-1.28952-3.773-.72615-5.5417.70345-2.20852,1.43649-4.46.56625-6.73562a6.14645,6.14645,0,0,0-10.1478-1.93645c-.92678.99935.46876,2.62523,1.40723,1.61328Z"
          transform="translate(-295.5 -220.70502)"
          fill="#6c63ff"
        />
        <circle cx="181.52022" cy="291.18521" r="2.14044" fill="#6c63ff" />
        <path
          d="M732.23656,430.54049a16.246,16.246,0,0,0-24.61284,9.60991L677.815,517.81975l-51.23782-29.089a15.86294,15.86294,0,1,0-9.89689,15.77768c10.79025,11.51632,57.56985,58.73308,76.93627,40.28435,16.27844-15.507,39.77018-75.60672,45.42506-96.36037A16.24774,16.24774,0,0,0,732.23656,430.54049Z"
          transform="translate(-295.5 -220.70502)"
          fill="#a0616a"
        />
        <polygon
          points="380.764 327.342 390.17 369.859 458.955 376.081 465.277 339.06 380.764 327.342"
          fill="#a0616a"
        />
        <path
          d="M772.55941,614.45652h-97.65l5.07-15.23,1.66-22.6.95.02,75.1,1.25,1.36.02,2.31,19.4A85.79089,85.79089,0,0,1,772.55941,614.45652Z"
          transform="translate(-295.5 -220.70502)"
          fill="#2f2e41"
        />
        <path
          d="M719.195,409.93543l34.23763-1.76372,15.90248,25.12784S784.679,436.44693,782.605,471.705s-21.82779,68.05222-21.82779,68.05222l1.46754-5.03131-2.54874,7.28264.32684,4.08923,3.477,4.33064.358,4.47868-3.08057,7.08607,4.18924,6.7849-88.07671-8.53326L673.669,548.51216l4.69836-6.30033-2.62435-8.21771,3.94537-7.90408,2.05726-1.71477s-22.50726-33.814,3.33039-59.28221l10.37-17.62905L707.0492,433.3076Z"
          transform="translate(-295.5 -220.70502)"
          fill="#3f3d56"
        />
        <path
          d="M606.84215,459.36075c-9.26171-3.30878-21.25635-2.01816-27.75645,6.04769-5.822,7.22443-6.52031,18.72725.88738,25.17454,9.01754,7.84842,21.50646,4.96123,31.3526.53325,9.00962-4.05178,18.927-10.58441,18.78763-21.6708a17.93541,17.93541,0,0,0-7.5937-14.51993,18.18072,18.18072,0,0,0-16.287-2.06181c-2.37778.86886-1.3507,4.70278,1.05423,3.824a13.93579,13.93579,0,0,1,18.71725,10.84041c1.391,9.2047-6.4735,15.16623-13.78224,18.79816-8.01815,3.98446-18.22325,7.79666-26.80715,3.219-7.34259-3.91567-8.68537-12.84654-4.61469-19.70511,5.04686-8.50333,16.409-9.7203,24.98794-6.65543,2.40771.86016,3.44416-2.97019,1.05423-3.824Z"
          transform="translate(-295.5 -220.70502)"
          fill="#3f3d56"
        />
        <path
          d="M429.574,382.387c-6.65214-2.37651-15.2672-1.44953-19.93585,4.3437-4.18161,5.18889-4.68316,13.4507.63736,18.08141,6.47678,5.63707,15.44684,3.56336,22.51875.383,6.47108-2.91016,13.59415-7.60216,13.49406-15.56488a12.882,12.882,0,0,0-5.45411-10.42881,13.05809,13.05809,0,0,0-11.698-1.48088c-1.70782.62405-.97013,3.37773.7572,2.74656a10.00926,10.00926,0,0,1,13.4435,7.786c.99905,6.6112-4.64953,10.893-9.899,13.50163-5.759,2.86181-13.08871,5.59989-19.254,2.312-5.27376-2.81239-6.2382-9.22692-3.31447-14.153,3.62487-6.10745,11.78563-6.98153,17.94739-4.78021,1.72932.6178,2.47374-2.13332.75719-2.74656Z"
          transform="translate(-295.5 -220.70502)"
          fill="#f2f2f2"
        />
        <ellipse
          cx="507.2119"
          cy="389.49058"
          rx="17.98481"
          ry="12.18716"
          transform="translate(-379.94491 -73.92629) rotate(-15.21622)"
          fill="#f2f2f2"
        />
        <path
          d="M465.8467,378.606l.03529,22.39365a1.5009,1.5009,0,0,0,3,0L468.8467,378.606a1.5009,1.5009,0,0,0-3,0Z"
          transform="translate(-295.5 -220.70502)"
          fill="#f2f2f2"
        />
        <path
          d="M455.38443,390.65191l21.82664.05341a1.5009,1.5009,0,0,0,0-3l-21.82664-.05341a1.5009,1.5009,0,0,0,0,3Z"
          transform="translate(-295.5 -220.70502)"
          fill="#f2f2f2"
        />
        <path
          d="M382.425,401.575a1.29143,1.29143,0,0,1-1.17,1.39v-2.94A1.52577,1.52577,0,0,1,382.425,401.575Z"
          transform="translate(-295.5 -220.70502)"
          fill="#f2f2f2"
        />
        <circle cx="92.28939" cy="180.84153" r="2" fill="#f2f2f2" />
        <path
          d="M454.645,583.545c-3.64,0-6.61,2.47-6.61,5.5,0,3.03,2.97,5.5,6.61,5.5h364.1v-11Z"
          transform="translate(-295.5 -220.70502)"
          fill="#fff"
        />
        <path
          d="M731.605,583.545v11H454.645c-3.64,0-6.61-2.47-6.61-5.5,0-3.03,2.97-5.5,6.61-5.5Z"
          transform="translate(-295.5 -220.70502)"
          fill="#6c63ff"
        />
        <circle cx="426.10498" cy="368" r="11" fill="#6c63ff" />
        <path
          d="M442.055,426.395h-60.8v4.58h60.8a2.29,2.29,0,0,0,0-4.58Z"
          transform="translate(-295.5 -220.70502)"
          fill="#fff"
        />
        <path
          d="M594.41924,389.975c1.98346-5.09721,9.32649-6.77612,13.38933-3.23555,2.42517,2.11341,4.233,5.01547,7.43875,6.05248,3.45985,1.11923,6.74218-.72863,9.69778-2.32949a14.71773,14.71773,0,0,1,4.95586-1.91869,12.22522,12.22522,0,0,1,4.73163.40469c3.41256.89806,6.5457,2.61267,9.78867,3.96168a26.87247,26.87247,0,0,0,11.0346,2.13989c4.50625-.06843,9.01324-.24634,13.51823-.373q7.5679-.2127,15.13579-.42542a93.13105,93.13105,0,0,0,14.844-1.27145c1.89439-.36078,1.09223-3.25273-.79752-2.89283a85.395,85.395,0,0,1-13.57062,1.15078q-6.93666.19881-13.87353.39007c-4.70435.13222-9.40854.27461-14.11317.3965a27.11085,27.11085,0,0,1-6.26732-.32891,28.25569,28.25569,0,0,1-5.11291-1.67851c-3.34881-1.40555-6.5929-3.18838-10.14338-4.05162a14.45272,14.45272,0,0,0-10.08314,1.09216c-2.86062,1.39605-6.38166,4.28415-9.67767,2.52476-2.86412-1.52887-4.43567-4.72455-7.26858-6.35334-5.92994-3.40941-14.07959-.32227-16.5196,5.94824-.7005,1.80018,2.19916,2.58016,2.89283.79752Z"
          transform="translate(-295.5 -220.70502)"
          fill="#f2f2f2"
        />
        <path
          d="M602.11019,413.96c2.1276-3.15092,4.52382-6.77314,8.40718-7.84493a6.01292,6.01292,0,0,1,5.06361.65233c1.37711.92621,2.42826,2.278,3.746,3.28639,2.77987,2.12734,5.8533,1.79731,8.84324.32574,2.52714-1.24378,5.37547-3.7002,8.3724-2.71609,2.09353.68745,3.72513,2.36834,5.75159,3.2248a6.575,6.575,0,0,0,6.01511-.08079,1.50112,1.50112,0,0,0-1.51415-2.59041c-1.72965,1.01184-3.74914-.183-5.228-1.14062a14.21557,14.21557,0,0,0-5.19245-2.53264c-3.34761-.56589-6.19329,1.37417-9.00355,2.87582a7.21608,7.21608,0,0,1-4.16854,1.20659c-1.63559-.22-2.82332-1.58763-3.952-2.65991a10.82372,10.82372,0,0,0-4.34517-2.8015,9.67155,9.67155,0,0,0-5.75046.23483c-4.40355,1.50843-7.13834,5.34841-9.63522,9.04624-1.0833,1.60435,1.51464,3.10736,2.59041,1.51415Z"
          transform="translate(-295.5 -220.70502)"
          fill="#f2f2f2"
        />
        <path
          d="M564.82082,380.44751a2.71591,2.71591,0,0,1-3.82486-3.31375c.8732-2.21007,4.04793-1.699,5.25046-.145,1.71628,2.21784.92328,5.29291-.64831,7.33187-1.94726,2.52633-4.94524,3.961-7.73162,5.35051a1.51492,1.51492,0,0,0,.35832,2.74163l11.0164,2.39117c1.88217.40854,2.68632-2.48286.79752-2.89283l-11.0164-2.39118.35832,2.74162c3.13241-1.562,6.32312-3.23338,8.51738-6.04838a9.44379,9.44379,0,0,0,1.8203-9.00213,6.60432,6.60432,0,0,0-7.04356-4.49259,5.47032,5.47032,0,0,0-4.7275,6.55632c.73613,3.8339,5.08412,5.41654,8.38771,3.76318,1.72672-.86418.2092-3.45291-1.51416-2.59041Z"
          transform="translate(-295.5 -220.70502)"
          fill="#f2f2f2"
        />
        <circle cx="279.78939" cy="173.34153" r="2" fill="#f2f2f2" />
        <path
          d="M624.055,426.565h-66.15a2.285,2.285,0,1,0,0,4.57h66.15a2.285,2.285,0,0,0,0-4.57Z"
          transform="translate(-295.5 -220.70502)"
          fill="#f2f2f2"
        />
        <path
          d="M575.85716,473.80886h-81.4331a1,1,0,1,1,0-2h81.4331a1,1,0,0,1,0,2Z"
          transform="translate(-295.5 -220.70502)"
          fill="#3f3d56"
        />
        <circle cx="193.27249" cy="256.10384" r="10" fill="#6c63ff" />
        <path
          d="M424.905,331.365c-1.8,2.57-4.73,4.06-7.55,5.46q-13.89,6.9-27.79,13.79l.5.6.35.43.49.58q-3.825,5.13006-7.65,10.25c-.67.89-1.33,1.79-2,2.68v-55.74c.67-.27,1.33-.54,2-.8q9.555-3.84,19.1-7.66c3.31-1.32,6.83-2.67005,10.33-2.06,7.05,1.22,10.32995,9.25,12.37,16.11C426.665,320.425,428.145,326.725,424.905,331.365Z"
          transform="translate(-295.5 -220.70502)"
          fill="#fff"
        />
        <path
          d="M391.515,352.675q-4.125,5.535-8.26,11.08c-.67.89-1.33,1.79-2,2.68v-2.55c.67-.89,1.34-1.79,2-2.68q3.525-4.71,7.03-9.42005a.86283.86283,0,0,1,.13-.13995C391.035,351.125,392.065,351.935,391.515,352.675Z"
          transform="translate(-295.5 -220.70502)"
          fill="#ccc"
        />
        <path
          d="M426.115,330.845c-1.54,2.8-4.28,4.53-7.04,5.96-3.15,1.63-6.36,3.17-9.54,4.75q-9.75,4.83-19.47,9.66c-.06.03-.13.06-.19.09-.88.44-1.78-2.4-.81-3.77,3.85-5.43994,16.92-5.91,23.02-8.93994,1.54-.77,3.08-1.53,4.63-2.3a40.04331,40.04331,0,0,0,4.13-2.23,10.6167,10.6167,0,0,0,4.89-6.4,17.70051,17.70051,0,0,0-.17-7.63,58.40842,58.40842,0,0,0-2.25-7.98c-1.76-4.98-4.61-11.05-10.29-12.33-2.68-.6-5.42.09-7.94.99-2.94,1.06-5.83,2.3-8.73,3.46q-6.555,2.625-13.1,5.25c-.67.27-1.33.53-2,.8v-1.63c.67-.27,1.33-.54,2-.81006q8.34-3.33,16.69-6.68a43.86184,43.86184,0,0,1,8.54-2.9,11.73618,11.73618,0,0,1,8.18,1.39,16.749,16.749,0,0,1,5.75,6.57,45.439,45.439,0,0,1,3.39,8.71C427.305,319.935,428.825,325.915,426.115,330.845Z"
          transform="translate(-295.5 -220.70502)"
          fill="#ccc"
        />
        <path
          d="M389.84752,318.32669l0,0c-.00821.01875-.01507.03775-.02308.05654a5.85692,5.85692,0,0,0-7.61535,3.05618l0,0a5.85711,5.85711,0,0,0,2.94362,7.68308l-.0008.00183.07208.03158h0l10.6593,4.67,4.70159-10.73138-.03072-.01346c.008-.01779.0169-.03489.02474-.0528l0,0a5.85806,5.85806,0,0,0-3.01489-7.71648h0A5.858,5.858,0,0,0,389.84752,318.32669Z"
          transform="translate(-295.5 -220.70502)"
          fill="#6c63ff"
        />
        <path
          d="M818.745,522.515c-.64-1.36-1.3-2.74-2-4.13-2.51-5.07-5.36-10.37-8.39-15.69-8.33-14.7-18-29.6-25.61-40.32v-.01c-3.07-4.33-5.81-7.96-7.99-10.64a16.24479,16.24479,0,1,0-25.04,20.7l24.67,37.47,11.61,17.64,9.46,14.38-32.46,14.97-5.31,2.45-15.65,7.22-.09.04c-.03-.02-.07-.04-.1-.06a16.07646,16.07646,0,0,0-2.42-1.21,15.83043,15.83043,0,0,0-6.51-1.09,15.65069,15.65069,0,0,0-4.81.97,15.8634,15.8634,0,0,0-10.11,12.03c-.07.32-.11.65-.15.99a.75687.75687,0,0,0-.01.15h-.01a15.92346,15.92346,0,0,0,8.64,15.88c.2.1.4.2.61.29a15.02183,15.02183,0,0,0,3.12,1.03,15.78688,15.78688,0,0,0,4.09.35,16.06015,16.06015,0,0,0,3.77-.62h.01a16.36994,16.36994,0,0,0,2.06-.76,15.93224,15.93224,0,0,0,8.88-10.71c.64-.08,1.36-.18,2.15-.29,1.62-.23,3.54-.52,5.71-.87.86-.14,1.76-.29,2.69-.45,16.26-2.8,42.83-8.76,57.19-19.3.7-.52,1.37-1.04,2-1.57Z"
          transform="translate(-295.5 -220.70502)"
          fill="#a0616a"
        />
        <path
          d="M790.995,220.705H409.005a27.78321,27.78321,0,0,0-27.75,27.75v403.1a27.77465,27.77465,0,0,0,27.75,27.74h381.99a27.77469,27.77469,0,0,0,27.75-27.74v-403.1A27.78325,27.78325,0,0,0,790.995,220.705Zm25.75,430.85a25.77522,25.77522,0,0,1-25.75,25.74H409.005a25.77522,25.77522,0,0,1-25.75-25.74v-403.1a25.77734,25.77734,0,0,1,25.75-25.75h381.99a25.77734,25.77734,0,0,1,25.75,25.75Zm-435.49-366.01v328.41h2V285.545Z"
          transform="translate(-295.5 -220.70502)"
          fill="#3f3d56"
        />
        <circle cx="122.10498" cy="367" r="16" fill="#6c63ff" />
        <path
          d="M415.177,596.32625a1.06264,1.06264,0,0,1-.40625-.0822,1.02737,1.02737,0,0,1-.644-.964V580.55179a1.04339,1.04339,0,0,1,1.78125-.73777l7.36413,7.36413a1.04432,1.04432,0,0,1,0,1.47554l-7.36413,7.36413A1.028,1.028,0,0,1,415.177,596.32625Z"
          transform="translate(-295.5 -220.70502)"
          fill="#fff"
        />
        <circle cx="448.20332" cy="111.04694" r="18" fill="#2f2e41" />
        <path
          d="M743.84937,357.82835c-8.5946-4.99588-10.95133-16.40164-5.66124-24.81834a18,18,0,0,1,24.81835-5.66124c8.4167,5.29009,2.09715,15.5381,5.66124,24.81835C773.70964,365.29535,755.43986,364.56573,743.84937,357.82835Z"
          transform="translate(-295.5 -220.70502)"
          fill="#2f2e41"
        />
        <path
          d="M702.05585,352.25728c-.62555,1.45778-19.91372,1.30157-20.79712,2.59964-6.811,10.02164,17.74146,52.66119,10.93042,62.69584l-.94884,1.13083a44.83653,44.83653,0,0,0,6.38208-3.60052c.182-4.1074.364-8.22788.55891-12.33528a33.90391,33.90391,0,0,1,4.88734,8.59179c1.58582-1.11782,2.88667-3.19,9.68367-7.266a42.62769,42.62769,0,0,1,9.41925-7.75369Z"
          transform="translate(-295.5 -220.70502)"
          fill="#2f2e41"
        />
        <circle cx="416.1171" cy="146.91385" r="31.92478" fill="#a0616a" />
        <path
          d="M735.86417,413.60879a15.37512,15.37512,0,0,1-5.14731-8.44883,33.03453,33.03453,0,0,0,.455,12.06229c-1.72878,1.29982-3.40552,2.53466-4.99134,3.65249a33.90387,33.90387,0,0,0-4.88733-8.59179c-.19493,4.1074-.37692,8.22788-.55892,12.33528a44.837,44.837,0,0,1-6.38208,3.60052l.94885-1.13083c6.811-10.03465-10.81451-28.505-4.00347-38.52668,1.91078-2.80766-6.72005-24.99551-13.29713-25.9964-5.84919-.88386-5.60222.80589-11.26942,2.04073a28.35825,28.35825,0,0,0-2.71666-7.03207,23.23476,23.23476,0,0,1-.22094,7.409c-2.01471.078-3.59982-1.20576-5.74518-1.53378-13.68714-2.09269-12.29633-16.89758-8.48786-21.59,3.82147-4.67932,16.50772-6.08314,22.35691-7.604.53289-.51988,1.74172-.19492,2.27469-.68886,11.20964-10.25886,26.20182-11.95781,39.69336-7.41086,14.38773,4.849,23.35823,14.23394,27.96224,28.70191L763.168,366.435c1.18466,3.72276-.3056,21.04429-1.32047,24.81687C757.90258,405.91648,749.5009,398.59586,735.86417,413.60879Z"
          transform="translate(-295.5 -220.70502)"
          fill="#2f2e41"
        />
      </svg>
    </div>

    <div class="desc">
      <el-row>
        <el-col :span="16">
          <el-row style="text-align: left">
            <el-link :underline="false"> 授课教师：{{ teacherName }} </el-link>
          </el-row>
          <el-row style="text-align: left">
            <el-link :underline="false"> 授课科目：{{ subjectName }} </el-link>
          </el-row>
        </el-col>
        <el-col style="display: flex; align-items: center" :span="8">
          <span>
            <svg
              t="1650740066489"
              viewBox="0 0 1024 1024"
              version="1.1"
              xmlns="http://www.w3.org/2000/svg"
              p-id="1575"
              width="40"
              height="40"
            >
              <path
                d="M512 322c-104.92 0-190 85.08-190 190s85.08 190 190 190 190-85.06 190-190-85.08-190-190-190z"
                p-id="1576"
                fill="#d81e06"
              ></path>
            </svg>
          </span>
          <span>
            直播中
          </span>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
import { getById } from "@/api/common"
export default {
  props: {
    info: {
      type: Object,
    },
  },
  data() {
    return {
      title: "",
      id: "",
      teacherName: "",
      subjectName: "",
    };
  },

  created() {
    this.title = this.info.title;
    this.id = this.info.id;

    let id = this.info.teacherId
    getById("user", { id }).then(res => {
      this.teacherName = res.realName
    })

    id = this.info.subjectId;
    getById("courseSubject", { id }).then(res => {
      this.subjectName = res.name;
    })
  },
  
  methods: {
    click() {
      const id = this.id;
      const title = this.title;
      const content = this.info.content;
      const teacherId = this.info.teacherId;
      const teacherName = this.teacherName; 
      this.$store.dispatch("live/setLiveRoom", { id, title, content, teacherId, teacherName }).then(() => {
        this.$router.push("/liveRoom");
      })
    }
  }
};
</script>

<style lang="scss" scoped>
.component {
  width: 100%;
  height: 100%;

  .image {
    width: 100%;
    height: 70%;
    border-radius: 1rem;
    cursor: pointer;
  }
}
</style>